﻿<local:DocumentBase x:Class="WPFExcelReport.DSTGBMOV"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:DSTGBMOV"
                    Height="700" Width="1024" 
                    Title="DSTGBMOV"  
                    >
    <local:DocumentBase.Resources>
        <db:SETVV  x:Key="SETUI" />
        <CollectionViewSource   x:Key="vwKUNDADR" Source="{Binding Path=KUNDADR,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwKDSTAMM" Source="{Binding Path=KDSTAMM,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwVKKOPF" Source="{Binding Path=VKKOPF,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwVKPOS" Source="{Binding Path=VKPOS,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwVVTLIEF" Source="{Binding Path=VVTLIEF,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwVVLIEF" Source="{Binding Path=VVLIEF,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwWBBST" Source="{Binding Path=WBBST,Source={StaticResource SETUI}}" />
        <CollectionViewSource   x:Key="vwVVPACK" Source="{Binding Path=VVPACK,Source={StaticResource SETUI}}" />
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="200" />
            <RowDefinition Height="500" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2"  >            
            <WrapPanel Name="ZoneOrder">
                <Label Content="开始日期"    Width="74" Margin="0,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtBYEAR" Width="50" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="2011" Foreground="#FF1D1A1A" />
                <Label Content="年"    Width="20" Margin="0,0,0,0" HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtBMONTH" Width="30" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Beige" Text="05" FontSize="18" Height="30" Foreground="#FF1D1A1A" />
                <Label Content="月"    Width="20" Margin="0,0,0,0" HorizontalAlignment="Left"    FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtBDAY" Width="30" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="YellowGreen" FontSize="18" Text="01" Height="30" Foreground="#FF1D1A1A" />
                <Label Content="日"    Width="20" Margin="0,0,0,0" HorizontalAlignment="Left"    FontSize="18" VerticalAlignment="Center" />
                <Label Content="结束日期"    Width="80" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtEYEAR" Width="50" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="2011" Foreground="#FF1D1A1A" />
                <Label Content="年"    Width="20" Margin="0,0,0,0" HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtEMONTH" Width="30" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Beige" Text="05" FontSize="18" Height="30" Foreground="#FF1D1A1A" />
                <Label Content="月"    Width="20" Margin="0,0,0,0" HorizontalAlignment="Left"    FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtEDAY" Width="30" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="YellowGreen" FontSize="18" Text="01" Height="30" Foreground="#FF1D1A1A" />
                <Label Content="日"    Width="20" Margin="0,0,0,0" HorizontalAlignment="Left"    FontSize="18" VerticalAlignment="Center" />
                <Label Content="销售单号"    Width="80" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtORDER" Width="104" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="" Foreground="#FF1D1A1A" />
                <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnGetGBMOV" Click="btnGetGBMOV_Click"  KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Search.png" />
                    </Button.Background>
                </Button>
                <Button   Height="30" Margin="20,0,0,0"  Name="btnPrintPreview" Width="30" Click="btnPrintPreview_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Print.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
            <WrapPanel Name="ZoneFTP"
                   Visibility="Hidden">
                <CheckBox FontSize="14"
                      Content="属于管理员"
                      Name="IsBelongs2Admin"></CheckBox>
                <TextBlock FontSize="14"
                       MinWidth="200"
                       Width="Auto"
                       Name="Administration"
                       Background="#FF00AF00"></TextBlock>
                <TextBlock>FTP站点:</TextBlock>
                <TextBox Name="txtFTPSite"
                     Width="Auto"
                     TabIndex="6">192.168.1.102</TextBox>
                <TextBox Name="txtFTPPort"
                     Width="Auto"
                     TabIndex="7">21</TextBox>
                <Label Content="用户名"
                   Width="60"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
                <TextBox Name="txtFTPUser"
                     Width="80"
                     Margin="10,0,0,0"
                     Text="sun"
                     HorizontalAlignment="Left"
                     Background="Yellow"
                     FontSize="18"
                     MaxLength="8"
                     AcceptsTab="False"
                     CharacterCasing="Upper"
                     KeyboardNavigation.TabIndex="0"
                     TabIndex="8" />
                <Label Content="密码"
                   Width="40"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
                <PasswordBox Name="txtFTPPwd"
                         Width="80"
                         Margin="10,0,0,0"
                         HorizontalAlignment="Left"
                         Background="Yellow"
                         FontSize="18"
                         KeyboardNavigation.TabIndex="1"
                         TabIndex="9" />
                <Button Height="Auto"
                    Margin="10,0,0,0"
                    Name="btnLogFTP"
                    Width="34"
                    Click="btnLogFTP_Click"
                    KeyboardNavigation.TabIndex="2"
                    IsDefault="True"
                    TabIndex="10">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/User.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
            </StackPanel>
        <StackPanel  Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" Margin="0,0,3,0">
            <fd:FilteringDataGrid
            CanUserReorderColumns="True"  
            CanUserResizeRows="True" 
            CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"  
            EnableRowVirtualization="True"  
            RowDetailsVisibilityMode="VisibleWhenSelected"
            HorizontalAlignment="Stretch" 
            VerticalAlignment="Stretch"
            IsSynchronizedWithCurrentItem="True" 
            Opacity="10" 
            Visibility="Visible"
            ItemsSource="{Binding}" 
            Margin="0,2,0,0" 
            x:Name="dlgGBMOV" >
                <DataGrid.Columns>
                    <!--GABBUCHDAT,A.GABART,A.GABVAR,A.GABFARBE,A.GABPARTIE,D.GPLIEFSCH,D.GPSPPART,A.GABKG/1000 AS KG,
                    A.GABSP,TRIM(B.GLBEM) AS CO,H.KDKUNDNA-->
                    <DataGridTextColumn Binding="{Binding Path=GABBUCHDAT}" Header="发纱日期" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=KDKUNDNA}" Header="客户" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=CO}" Header="销售单号" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=GABART}" Header="纱线编号"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=GABVAR}" Header="变量"  MinWidth="20"/>
                    <DataGridTextColumn Binding="{Binding Path=GABFARBE}" Header="色号" Width="SizeToCells"  MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=GABPARTIE}" Header="LOT号"  MinWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=LSNAME1}" Header="供应商"  MinWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=GPLIEFSCH}" Header="送货单" Width="SizeToCells" MinWidth="20"/>
                    <DataGridTextColumn Binding="{Binding Path=GPSPPART}" Header="纺批" Width="SizeToCells" MinWidth="70"/>
                    <DataGridTextColumn Binding="{Binding Path=KG}" Header="重量KG" Width="SizeToCells" FontSize="12" Foreground ="Red" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=GABSP}" Header="件数"   FontSize="12" Foreground ="Red"  MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=PRICE}" Header="单价"   FontSize="12" Foreground ="Red"  MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VALUE}" Header="总金额"   FontSize="12" Foreground ="Red" Width="SizeToCells" MinWidth="40"/>
                </DataGrid.Columns>
            </fd:FilteringDataGrid  >
        </StackPanel>
    </Grid>
</local:DocumentBase>